//创建MyThread继承Thread类
class MyThread extends Thread{
    @Override
    public void run() {
        while (true){
            System.out.println("MyThread");
        }
    }
}
public class Test3 {
    public static void main(String[] args) {
        MyThread myThread = new MyThread() ;
        //1.如果不调用start(),而调用run() ;
        myThread.run();
        //2.如果调用start() ;
//        myThread.start();
        while (true){
            System.out.println("main");
        }
    }
}


